#include<stdio.h>
int main()
{
	int n,tmp,min=100000000,i;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&tmp);
		if(tmp<min)
		{
			min=tmp;
		}
	}
	printf("%d",min);
	return 0;
} 
